Networks often rely on devices such as switches to receive packets of data from the network, determine where the packets need to go, and forward the packets accordingly. Switches must be able to communicate with other switches in the network to establish protocols (e.g., layer 2, L2 or data-link layer control protocols) regarding the forwarding of packets. The exchange of control protocols enables switches to determine where packets need to go and avoid forwarding loops in the network.
This communication is made possible by the exchange of special packets containing protocol control information. These special packets, called protocol data units (PDUs), tell the switches which forwarding state (e.g., listening, learning, forwarding) to maintain. In general, when a switch receives a PDU it must process the PDU using protocol software (such as Spanning Tree Protocol software) and then make corresponding configuration changes in the hardware. Thus, switches are typically required to perform not only routing lookup and forwarding in hardware, but also application-level proxy and network layer address translation.